package org.ant.gui.bar;

import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.ant.gui.layout.GBC;

public class FloorBar extends JPanel implements ActionListener{

	private JLabel infLabel;

	public FloorBar() {
		super();
		init();
		loadComponents();
		setInf("I am an ant~~~~~~~~~~~~~~");
	}

	protected void init() {
		setLayout(new GridBagLayout());
	}

	protected void loadComponents() {
		add(getInfLabel(), new GBC(0, 0, 1, 1).setWeight(1, 0).setAnchor(
				GBC.WEST).setFill(GBC.HORIZONTAL));
	}

	public JLabel getInfLabel() {
		if (infLabel == null) {
			infLabel = new JLabel();
		}
		return infLabel;
	}

	public void setInf(String inf) {
		getInfLabel().setText(inf);
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
	}
}
